package main.scala

object Calculator extends Parser {

	def simplifyString(s : String) = {
		parseAll(start, s) match {
		  case Success(e, in) => Success(simplifyParserExp(e), in)
		  case f => f
		}
	}
	
	def simplifyParserExp(e : AST.Exp) = {
		SimplifyRewriter.start(AlgebraicRewriter.start(e))
	}
}